<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>window对象</title>
		<script> 
		    function showDate(){
					window.document.getElementById("timer").innerHTML=new Date().toLocaleString();		
			}
		</script>
	</head>
	<body onload="showDate()">
		<p id="timer"></p>
	</body>
</html>